#pragma once

#define GLM_ENABLE_EXPERIMENTAL
#include <glm/glm.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/transform.hpp>
#include "../Force/Force.h"
#include "../Force/Elasticity.h"

#include <glm/glm.hpp>
#include "../Force/Force.h"

#include "../Base/Rect.h"
#include <vector>
#include <algorithm>
#include <SDL2/SDL.h>
#include <SDL2/SDL2_gfxPrimitives.h>

using namespace glm;

enum ObjectType
{
	CIRCLE,
    BOX
};


class Object
{
public:

    Object(){}
	~Object(){}

	virtual void applyForce(Force f);
	virtual Rect getRect() {return Rect(vec2(0,0),vec2(320,240));
	}
	virtual int getType() { return type; }
	virtual void update(float dt,SDL_Renderer* renderer);
	virtual vec2 getPosition();
	virtual vec2 getVelocity();
    virtual float getMass();
	virtual void setPosition(float x, float y);
	virtual void setdynamic(bool is);
	virtual bool getdynamic();

	virtual quat getrotation();
	virtual void setrotation(quat q);
	virtual void setVelocity(vec2 v);


protected:

	int type=-1;
	vec2 position;
	vec2 velocity;

	vec2 axis;
	quat rotation;
	
	bool isDynamic=true;

	float mass;
	std::vector<Force> forces;
};
